package com.hg.library.widget;

import android.view.View;

/**
 * Created by ASUS-PC on 2016/7/6.
 */
public abstract class CuteAdapter<S> {

    private final CuteObservable mCuteObservable = new CuteObservable();

    public void registerCuteObserver(CuteObserver observer) {
        mCuteObservable.registerObserver(observer);
    }

    public void unregisterCuteObserver(CuteObserver observer) {
        mCuteObservable.unregisterObserver(observer);
    }

    public void destroy(){}

    public void notifyDataSetChanged() {
        mCuteObservable.notifyChanged();
    }

    public abstract int getItemCount();

    public abstract S getItemData(int position);

    public abstract View onCreateView(int position,S s);

    public abstract View onHolderView(View view,int position,S s);
}
